Skip to main content

Event Tracking

Purchase Event Tracking

Loomit SDK supports tracking purchase events. This feature allows you to send purchase information to the Loomit platform for analytics and segmentation purposes.

Purchase Event Structure

A purchase event consists of the following fields:

FieldTypeRequiredDescription
amountDoubleYesThe purchase amount
currencyStringYesThe currency code in ISO 4217 format (e.g., "USD", "EUR")
skuStringNoProduct identifier, important for segmentation and tracking
nameStringNoProduct name, used for tracking purposes

Best Practices

  • Always include the amount and currency fields as they are required
  • Use a consistent format for your sku values to ensure proper segmentation
  • Track all successful purchases to get comprehensive analytics
  • Use the same currency code format across your application

Implementation

XMediatorAds.EventTracker.track(
PurchaseEvent(
amount = 1.99,
currency = "USD",
sku = "com.sku.myproduct",
name = "My Product Name"
)
)